Optimized performance for transaction-oriented communications using stream-based network protocols

ABSTRACT

A modified stream-based protocol implementation is employed within a network environment to compensate for inefficiencies associated with conventional stream based protocols, such as TCP. Characteristics of a transaction-based protocol are advantageously utilized in client/server data transactions to reduce the number of acknowledgment signals sent upon receipt of data, as well as eliminate delays associated with the buffering of data at the server. These results are accomplished without requiring changes to servers using standard stream-based protocols.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention is directed to computer networkcommunications, and more particularly to a stream-based protocol thatcan be efficiently interfaced with a transaction-based protocol.

[0003] 2. Description of the Related Art

[0004] With the advent of computers in the workplace, local areanetworks (LANs) have grown increasingly valuable for businesses as theirdependency upon fast and efficient dissemination of information grows.One commonly employed type of network generally comprises at least oneserver and a plurality of clients (e.g., workstations).

[0005] An exemplary conventional client/server network 100 isillustrated in FIG. 1. A first server 110 a is connected to a pluralityof client workstations 120. The architecture for connecting the clientsand servers can be Ethernet or token ring, for example. The server 110 ais able to control access to a resource (e.g., a hard disk or printer)and serves as a host to the client workstations 120. Each clientworkstation 120 makes requests to the server 110 a for access to files,programs or peripheral devices that are controlled by the server. Aclient/server network, such as the network illustrated in FIG. 1, canalso be connected to another client/server network having a server 110b. The various networks transfer information to one another throughdevices such as bridges and gateways.

[0006] A network uses protocols to quickly and efficiently transmit datafrom one location to another. A protocol is a set of predefined rulesthat govern how two or more connected processors communicate andinteract to exchange data. Protocols are distinguished by severaldifferent properties such as the “layer” at which the protocol operates,and the network architecture for which the protocol is designed.Additionally, protocols can be synchronous or asynchronous,connection-oriented or connectionless, character- or bit-oriented andstream-based or transaction-based.

[0007] When implementing a protocol within a network, the choice ofwhether the system operates with a stream-based protocol or atransaction-based protocol determines how data will be transmitted fromone location to another within the network. An example of a stream-basedprotocol is the transmission control protocol (TCP) which has norestrictions on the amount of data sent from one location to anotherwithin a network. Standard TCP implementations attempt to optimize thebulk transfer of large amounts of data over a network. This is achievedby buffering data being sent into large data groups each having a sizeequal to the maximum amount of data that can be transmitted as a unit,which is known as a Maximum Transmission Unit (MTU). This techniquereduces the number of packets needed to send data to a destinationprocessor.

[0008] An example of a transaction-based protocol is the AppleTalk FileProtocol (AFP), which moves data from one location to another based upondiscrete requests and discrete responses. In response to each discreterequest, the server normally sends a packet with a specific amount ofdata. As a result, many more discrete packets of data can be required tosend a message than when a stream-based protocol is used to send data.

[0009] While it is evident from the above description thattransaction-based and stream-based protocols are fundamentallydifferent, attempts have been made to use both protocols in conjunctionwith one another, where the transaction-based protocol is layered on topof the stream based protocol. In this case a data transmission issubject to both protocols. When using a transaction-based protocol inconjunction with a standard stream-based protocol, certain performancedeficiencies are exposed. For example, unwanted delays in datatransmission are introduced into the network when a stream-basedprotocol is used for transaction-oriented data transfers. When data isbeing sent from one location to another, the stream-based protocolcauses the data to be buffered into MTU packets before sending eachsegment of data. Complete MTU packets are sent continually until thelast segment of data, which may be less than an MTU. If the remainingdata to be sent in response to a transaction-based request is less thana complete MTU, the stream-based protocol will cause it to be held inthe buffer in anticipation of more data being sent. As a result, thebuffered data will not be sent until a timer within the host processorexpires. The delay introduced by this sequence can result in a severerestriction on the number of transactions that can be processed over aperiod of seconds or minutes.

[0010] Additionally, a stream-based protocol, such as TCP, inherentlyreduces the efficiency of data transmission. After one or more segmentsof data are transmitted, the client is required to send anacknowledgment packet to the sending processor. The acknowledgmentpacket indicates to the server the last contiguous segment that has beenproperly received by the client, so that the server can resend anypackets that may be missing. This results in a large ratio ofacknowledgment packets being sent per data packets received, resultingin less than optimal use of the network.

[0011] Due to the aforementioned limitations, there is a need for anenhanced stream-based network protocol implementation that optimizesperformance and network utilization. Additionally, there is a need forthe transactions to be more efficient when a stream-based networkprotocol is employed with transaction-based data transmission.

SUMMARY OF THE INVENTION

[0012] In accordance with an exemplary embodiment of the presentinvention, to compensate for limitations that arise when atransaction-based protocol is used together with stream-based protocols,the stream-based protocol is modified to take advantage of certaincharacteristics of transaction-based protocols.

[0013] In one aspect of the present invention, in order to compensatefor data transmission delays, the modified stream-based protocol usesknowledge of the amount of data being received from a server toanticipate when the last data segment is expected from the server. Theclient can send the server a preemptive acknowledgment packet to forcethe server to immediately send any buffered data segment to the client,rather than waiting for a time period to expire before datatransmission. As a result, the number of transactions that can beprocessed over a given time is increased.

[0014] In accordance with yet another aspect of the present invention,in order to compensate for inefficient network utilization, the modifiedstream-based protocol uses knowledge of the transaction-based protocolto anticipate the amount of data being returned from the server for eachclient request. As a result, the stream-based protocol located at theclient can forego the usual acknowledgment packet after every few datasegments, and send acknowledgments only when required to complete thetransmission. This results in far fewer segments being sent from theclient to the server, and thus a much more optimal use of theintervening network.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015] These and other features, objects and advantages associated withthe present invention will be more readily understood from the followingdetailed description of an embodiment of the invention, when read inconjunction with the drawings in which like reference numerals refer tolike elements and where:

[0016]FIG. 1 is an exemplary block diagram of a client/servercommunications system;

[0017]FIG. 2 illustrates an example of conventional communicationsbetween a client and server utilizing transaction-oriented traffic on astream-based network protocol;

[0018]FIG. 3 is an exemplary block diagram showing the conventional OSIreference model;

[0019]FIG. 4 is a flow diagram of the modified stream-based protocolemployed in a network in accordance with the present invention; and

[0020]FIG. 5 is an exemplary block diagram showing data communicationbetween a client and a server in accordance with the present inventionutilizing transaction-oriented traffic on a stream-based networkprotocol.

DETAILED DESCRIPTION

[0021] The present invention will be described hereinafter withreference to an embodiment illustrated in the accompanying drawings, inwhich a stream-based TCP is interfaced with a transaction-basedprotocol, such as AppleTalk Filing Protocol (AFP). However, theinvention is not limited to only the embodiments set forth within thisdisclosure. Rather, the stream-based TCP and the transaction-based AFP,as illustrated in this disclosure, are meant to be exemplary of manyother stream-based and transaction-based protocols that can be employedtogether in accordance with various embodiments of the invention for thepurpose of improving network performance.

[0022] Many networks, such as the client/server network illustrated inFIG. 1, utilize protocols which adhere to an Open SystemsInterconnection (OSI) reference model. This model establishes astandardized framework and terminology for describing the protocols ofnetwork architectures, as illustrated in FIG. 2. Each processor 210,which can represent a server or client, for example, implements seven“layers” through which communications can be performed. Within eachlayer, different system operations are performed. Protocols associatedwith each layer are able to communicate with one another through thehierarchy of layers. For example, a protocol located on a first layer ofthe network can communicate with a protocol on another layer directlyabove or below it. Additionally, a protocol located on a layer cancommunicate with a counterpart protocol operating at the same layer onanother processor. The use of different protocols between the layersallows selected services to be performed by other layers withoutexposing the details of actual implementation within a given layer.

[0023] A physical layer 230 is concerned with the transmission of rawdata to other processors via a connection 295. The physical layerreceives packets of data from the data-link layer 240 and converts thepackets into binary values used in digital transmission. The data linklayer 240 receives, creates and transmits data packets through the useof the physical layer 230. Data link control protocols are used tolabel, package and send packets.

[0024] The network layer 250 contains protocols which determine how datais routed from the source to the destination and establish and maintaina logical connection between the two processors. For example, InternetProtocol (IP) is a widely supported network layer protocol which definesand routes datagrams across the network and provides connectionlesstransport service. IP utilizes packet switching in the data link layer240 to accomplish actual transmission along a path.

[0025] The transport layer 260 employs protocols that are responsiblefor providing data transfer at a certain level of quality (i.e., errorrate or transmission speed). Transmission control protocol (TCP) is anexample of a connection- and stream-based transport layer protocol whichhas no boundaries on data. TCP can use IP at the network layer in orderto deliver packets of data. The session layer 270 protocols providesequencing and synchronization of the dialog and data packets in anetwork connection. The presentation layer 280 employs protocols toperform common functions such as data formatting, encoding, encryptionand decryption.

[0026] Finally, application layer 290 protocols perform common data baseaccessing and file transfer. AppleTalk File protocol (AFP) is an exampleof an application layer protocol which is a remote access file protocolthat is a transaction-based protocol. AFP can be used between fileservers and clients in a network and for remote access to a network.

[0027] Each of the layers described with respect to each processor inFIG. 2 are arranged in order to form a protocol stack for each processorwithin the LAN. A protocol stack is a set of protocols which worktogether on different levels to facilitate communication on a network.One of the most popular standard protocol stacks is the TCP/IP protocolstack, which supports both wide area networks and local area networks.

[0028] When a transaction-oriented application protocol is employed, theoverall communication that takes place between the server and a clientis transaction-oriented, even though a stream-based protocol stack, suchas TCP/IP, may be in use. Therefore, when a client processor makes arequest through a protocol such as AFP, for example to access a file,the response containing the necessary data from the server istransaction-based.

[0029]FIG. 3 illustrates communication between a client and server usinga conventional TCP implementation. Initially, the client 120 makes arequest, REQ, to the server 110. For instance, the request may be for 8kilobytes of data from a file stored at the server. The server 110, onceit receives the request, sends segments of data, (e.g., DATA SEG. 1,DATA SEG. 2) back to the client 120. For example, if the MaximumTransmission Unit (MTU) is 1460 bytes of data, the server will sendsegments of this size until all 8 kilobytes of the requested data havebeen sent. The TCP protocol guarantees that the segments will bedelivered to or from the server. In accordance with this feature of theprotocol, therefore, the client sends an acknowledgment signal, ACK, tothe server 110 upon successful receipt of a segment. Typically, the ACKsignal is sent after every other segment is successfully received, asdepicted in FIG. 3. The ACK signal indicates the last segment in acontiguous series of segments that have been properly received by theclient. It can be seen that a considerable number of ACK signals arerequired to successfully transmit data, resulting in less than optimaluse of the network.

[0030] In contrast to the TCP protocol, a transaction-based protocolsuch as AFP does not guarantee delivery of data segments, and thereforeacknowledgments are not employed. Rather, the server specifies theamount of data that is being sent in response to a request, and errorrecovery mechanisms are utilized on this data at the receiving end.

[0031] In accordance with an exemplary embodiment of the presentinvention, a modified TCP/IP protocol stack is employed at the clientwhich utilizes characteristics of the transaction-based protocol toprovide more efficient network operation. The flow diagram of FIG. 4illustrates the manner in which a modified TCP/IP stack is able toreduce system delays while increasing network efficiency. Initially, asshown in step 410, after receiving a data packet to be sent to theserver, the modified TCP/IP protocol stack determines whether atransaction-oriented protocol or a stream-based protocol is beingemployed in the application layer of the client 120. This might be done,for example, by examining the header of the packet and matching thepattern of the header information with that of known protocols todetermine which protocol is being employed. As shown in step 420, if astream-based protocol is determined to be employed in the applicationlayer of the client processor (i.e. transactions between the client andserver are stream-based), then no further inquiry is necessary andconventional client/server transactions are continued withoutmodification, as shown in step 430.

[0032] If the application layer protocol is determined to betransaction-based, a response packet is awaited from the server. In step440, the header of the server's response to the request is examined. Theexamination identifies the total amount of data to be transmitted. Instep 450, once this information is known, the TCP protocol stack sets astate machine, located in the client 120, to a value related to theamount of data to be received. In step 460, the client keeps track ofthe segments being received. Through comparison of the data remainingwith the MTU value for the network, the client is able to determine whenthe amount of data that remains to be received is less than an MTU.

[0033] In step 470, when the client determines that the amount of datato be transferred from the server is less than the MTU value, themodified TCP implementation initiates a preemptive ACK signal. Inaccordance with the stream-based protocol, the ACK signal causes theserver to send the next segment of data stored in the buffer, i.e, theserver is “poked” to transmit the next segment, whether or not itcomprises a complete MTU. Consequently, the remaining amount of data tobe transmitted from the server is immediately sent to the client,without the delay normally associated with buffering of the data. As aresult, the performance of the network is improved without anymodification of TCP/IP stack located on server side of the network.

[0034] Additionally, in contrast to the system illustrated in FIG. 2,since the amount of data being transferred is known, the client TCP canforego sending an acknowledgment after every second data segment, andinstead send an acknowledgment only when required (e.g., at the end ofthe response by the server). Hence, the only ACK signals required arethe preemptive “poke” signal initiated by the modified TCP to send thelast data segment, and a final ACK signal.

[0035] An example of the manner in which the modified TCP works isillustrated in the block diagram of FIG. 5. A client processor initiallysends a REQ signal to the server processor when requiring access to, forexample, a file. In response to the request, the server transmits atransaction-based data packet, if a transaction-based protocol is beingemployed in the application layer of the server. The initial datapacket, DATA SEG1, identifies the total amount of data to be sent. Thisinformation is contained within the header for the application-layerprotocol.

[0036] The modified TCP of the present invention examines this header todetermine the total amount of data to be transmitted in response to therequest. At that point, the state machine is set to this value, and thedata packets are sequentially received without sending the ACK signals.Meanwhile, the client processor continually monitors the amount of datathat has been transferred from the server to the client. When it isdetermined by the client processor that the last segment of data, DATASEG N, is being buffered at the server processor, it sends a preemptiveACK signal back to the server. This data is then immediately transmittedto the client and a final ACK signal is sent to acknowledge its receipt.As a result, there are only two ACK signals for each “quantum” of datausing the modified TCP, and due to the preemptive ACK signal, there isno delay in receiving the last data in a transaction.

[0037] In a stream-based protocol such as TCP, the server monitors theacknowledgment signals from the client to ensure the successful receiptof successive data packets. Each acknowledgment contains a pointer whichidentifies the last packet of a series of contiguous packets that werereceived at the client. The server looks for a progression of pointersin the successive acknowledgments. If the pointer remains the same overseveral acknowledgments, rather than advancing, this signifies that apacket has not been successfully received. In this case, the serverimplements a fast retransmission of the packets which follow the lastsuccessfully received packet.

[0038] As a further feature of the invention, the client can employ thisaspect of the protocol to compensate for hardware problems. Moreparticularly, if packets of data are being lost due to interruptions inthe signal from the server, upon detecting such a condition the clientcan repeatedly send a number of acknowledgments with the same pointer.This will cause the server to immediately resend the data packets whichwere lost, and thereby avoid the normal latency associated with thedetection and retransmission of packets at the server.

[0039] From the foregoing, it can be seen that the present inventionincreases the efficiency of network communication when atransaction-based protocol is employed in conjunction with astream-based protocol. This efficiency results from the decrease in thenumber of acknowledgment signals that are sent from a client to aserver, as well as elimination of the latencies associated with thebuffering of data at the server. A particular advantage of this approachis the fact that the modification of the TCP protocol to achieve thisoperation only occurs at the client station, on an as-needed basis, anddoes not affect the standard stream-based protocol at the server.

[0040] It will be appreciated by those of ordinary skill in the art thatthe present invention can be embodied in other specific forms withoutdeparting from the spirit or essential characteristics thereof. Thepresently disclosed embodiments are therefore considered in all respectsto be illustrative and not restrictive. The scope of the invention isindicated by the appended claims rather than the foregoing description,and all changes that come within the meaning and range of equivalencethereof are intended to be embraced therein.

What is claimed is:
 1. A method for communicating data betweencomputers, comprising the steps of: issuing a request for data from afirst computer to a second computer; determining the amount of data tobe received at said first computer in response to said request;monitoring data received at the first computer and detecting when theremaining amount of data to be received is less than a predeterminedamount; and sending a preemptive acknowledgment from said first computerto said second computer in response to said detection to prompt saidsecond computer to transmit the remaining data to be sent.
 2. The methodof claim 1 wherein said data is sent from said second computer to saidfirst computer in segments having a maximum size, and wherein saidpredetermined amount is based upon said maximum size.
 3. The method ofclaim 2 wherein said predetermined amount is equal to said maximum size.4. The method of claim 1 further including the step of sending a secondacknowledgment from said first computer to said second computer uponreceipt of said remaining data.
 5. The method of claim 4 furtherincluding the step of inhibiting the transmission of acknowledgments,other than said preemptive acknowledgment and said secondacknowledgment, from said first computer to said second computer duringthe transmission of data in response to said request.
 6. The method ofclaim 1 further including the steps of detecting a loss of data beingtransmitted from said second computer to said first computer, andrepeatedly sending the same acknowledgment to said second computer, toprompt said second computer to retransmit the lost data.
 7. The methodof claim 6 wherein each transmission of the repeated acknowledgmentidentifies the same segment of data received from the second computer.8. The method of claim 1 wherein said second computer responds to saidrequest by sending header information which identifies said amount ofdata, and said determining step is carried out by examining said headerinformation at said first computer.
 9. A computer network havingtransaction-oriented traffic using a stream-based protocol, comprising:means for transmitting a request from one computer to another computerand means for receiving at least one transmission packet from said othercomputer; means for identifying whether said request conforms to astream-based protocol or a transaction-based protocol; means fordetermining the maximum amount of data in a transmission packet and thetotal amount of data to be transferred from said other computer to saidone computer when said request conforms to a transaction-based protocol;and means for detecting when an amount of data remaining to betransmitted from said other computer is less than said maximum amount ofdata in a transmission packet, and for issuing an acknowledgment to saidother computer in response to said detection.
 10. A method forperforming data transmission on a network comprising at least one clientand at least one server, said method comprising the steps of:transmitting a request from said client to said server and receiving atransmission packet from said server; identifying a transmissionprotocol associated with said request as either a stream-based protocolor a transaction-based protocol; if said protocol is identified as atransaction-based protocol, then, determining the maximum amount of datain a transmission packet and the total amount of data to be transferredfrom said server to said client; transmitting a plurality oftransmission packets from said server to said client; and issuing aninitial acknowledgment only when an amount of data remaining to betransmitted is less than said maximum amount of data in a transmissionpacket; otherwise transmitting data in accordance with a stream-basedprotocol.
 11. A method for communicating data between computers,comprising the steps of: issuing a request for data from a firstcomputer and receiving the request for data in a second computer;fetching the data, by said second computer, in response to reception ofthe request from said first computer; loading said data into a bufferlocated in said second computer; sending the data located in the bufferof said second computer to said first computer when the amount of datain the buffer equals a predetermined amount of data or when anacknowledgment is received from said first computer; detecting at saidfirst computer when the amount of data remaining to be transferred isless than said predetermined amount; and sending an acknowledgment fromsaid first computer in response to said detection.
 12. The method ofclaim 11, wherein said data is sent from said second computer to saidfirst computer in segments having a maximum size and wherein saidpredetermined amount is based upon said maximum size.
 13. The method ofclaim 12, wherein said predetermined amount is equal to said maximumsize.
 14. The method of claim 11, further including the step of sendinga second acknowledgment after said data is received at said firstcomputer in response to an acknowledgment that is sent in response tosaid detection.
 15. The method of claim 11, further including the stepsof; indicating a loss of data being transmitted from said secondcomputer to 15 said first computer by sending repeated acknowledgmentsfrom said first computer, wherein the repeated acknowledgments identifythe last segment of data successfully received from the second computer.16. The method of claim 11, wherein said data sent from said secondcomputer to said first computer includes header information identifyingthe total amount of data to be sent from said second computer to saidfirst computer.
 17. A method for communicating data between computersutilizing a different protocols, comprising the steps of: issuing arequest for data from a first computer to a second computer in a formatwhich conforms to a transaction-based protocol; sending said data tosaid first computer in accordance with a stream-based protocol;monitoring data received at the first computer and detecting when theremaining amount of data to be received is less than a predeterminedamount; sending a preemptive acknowledgment from said first computer tosaid second computer in response to said detection to prompt said secondcomputer to transmit the remaining data to be sent.
 18. The method ofclaim 17, wherein said stream-based protocol transmits data as acontiguous stream of data segments.
 19. The method of claim 18, whereinsaid data segments have a maximum size, and wherein said predeterminedamount is based upon said maximum size.
 20. The method of claim 19,wherein said predetermined amount is equal to said maximum size.
 21. Themethod of claim 18, wherein said stream-based protocol is TCP.
 22. Acomputer-readable medium containing a program which executes the stepsof: issuing a request for data from a first computer to a secondcomputer; determining the amount of data to be received at said firstcomputer in response to said request; monitoring data received at thefirst computer and detecting when the remaining amount of data to bereceived is less than a predetermined amount; and sending a preemptiveacknowledgment from said first computer to said second computer inresponse to said detection to prompt said second computer to transmitthe remaining data to be sent.
 23. A computer-readable medium containinga program which executes the steps of: issuing a request for data from afirst computer to a second computer; determining the amount of data tobe received at said first computer in response to said request;monitoring data received at the first computer and detecting when theremaining amount of data to be received is less than a predeterminedamount; sending a preemptive acknowledgment from said first computer tosaid second computer in response to said detection to prompt said secondcomputer to transmit the remaining data to be sent; and sending a secondacknowledgment from said first computer to said second computer uponreceipt of said remaining data.
 24. A computer-readable mediumcontaining a program which executes the steps of: transmitting a requestfrom one computer to another computer; identifying whether said requestconforms to a stream-based protocol or a transaction-based protocol;determining the maximum amount of data in a transmission packet and thetotal amount of data to be transferred from said other computer to saidone computer when said request conforms to a transaction-based protocol;detecting when an amount of data remaining to be transmitted from saidother computer is less than said maximum amount of data in atransmission packet; issuing an acknowledgment to said other computer inresponse to said detection.